/**
 * Copyright (C), 2019-2023,
 * FileName: TestCLient
 * Author:   fanxquer
 * Date:     2023/7/6 10:36
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 邱富康           2023/7/6           1.0
 */
package com.hsteach.framework.feign.client.holiday;

import com.alibaba.fastjson2.JSONObject;
import com.hsteach.framework.feign.client.auth.AuthFeignConfig;
import com.hsteach.framework.feign.client.holiday.vo.HolidayResp;
import com.hsteach.framework.feign.client.holiday.vo.TXHolidayResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 〈节假日查询〉
 *
 * @author Qiu Fukang
 * @create 2023/7/6
 * @since 1.0.0
 */
@FeignClient(name = "holidayClient", url = "${interface.holiday.domain:https://apis.tianapi.com}", configuration = AuthFeignConfig.class)
public interface HolidayClient {

    /**
     * 节假日查询
     * @return
     */
    @GetMapping("/api/holiday/year/{date}?type=Y")
    HolidayResp getHoliday(@PathVariable("date") String date);

    @GetMapping("/jiejiari/index?key=c203da62ad00643646a17fa173c33bcf&type=1")
    TXHolidayResp getTXHoliday(@RequestParam("date") String date);

}